package com.shuang.service.impl;

import java.util.UUID;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.shuang.mapper.SsoLocalUserMapper;
import com.shuang.pojo.SsoLocalUser;
import com.shuang.service.IDService;
import com.shuang.service.SsoLocalUserService;
@Service("ssoLocalUserService")
public class SsoLocalUserServiceImpl implements SsoLocalUserService {
	
	@Resource(name="ssoLocalUserMapper")
	private SsoLocalUserMapper ssoLocalUserMapper;
	@Resource(name="iDService")
	private IDService iDService;
	
	@Override
	public SsoLocalUser addSsoLocalUser(SsoLocalUser ssoLocalUser) {
		ssoLocalUser.setId(UUID.randomUUID().toString());
		ssoLocalUser.setUsername(iDService.getNewSsoLocalUserName());
		return ssoLocalUser;
	}
}
